<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib tagdir="/WEB-INF/tags/html" prefix="html"%>
<%@ taglib tagdir="/WEB-INF/tags/ajax" prefix="ajax"%>
<%@ page session="false"%>

<div class="page-header">
  <h2>Edit your profile</h2>
  <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
    diam nonumy eirmod tempor invidunt ut labore et dolore magna
    aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
    duo dolores et ea rebum. Stet clita kasd.</p>
</div>

<c:url value="/coder/${coder.id}" var="coderAction" />
<form:form id="save-coder-form" modelAttribute="coder"
  action="${coderAction}" method="put" class="form-horizontal">
  <html:inputField label="Name" name="name" />
  <html:inputField label="Surname" name="surname" />
  <html:inputField label="E-Mail" name="email" />
  <html:inputField label="Birthdate" name="birthdate" />

  <div class="form-actions">
    <button type="submit" class="btn btn-primary">Save</button>
    <a href="${coderAction}" class="btn">Back to profile</a>
  </div>
</form:form>

<ajax:formValidation validateUrl="/coder/validate.json"
  formName="save-coder-form" />